#!/bin/bash

cd ~/linlabs/

# 1 -----
man man > test/t1.txt
man ps > test/t2.txt
man w > test/t3.txt
man tee > test/t4.txt

# 2 -----
#cat ~/linlabs/test/* 2> /dev/null | gzip > file
echo "-- before --" >> work2.log
gzip -r test

# 3 -----
echo "-- archieved --" >> work2.log
find test >> work2.log

# 4 -----
gunzip -r test

# 5 -----
echo "-- after --" >> work2.log
find test >> work2.log

# 6 -----
gzip -c -q -9 test/t1.txt > test/t1.txt.gz #--best

# 7 -----
ls -al >> work2.log
rm $(find test -name *.gz)

# 8 -----
tar -cf test.tar test

# 9 -----
#--use-compress-program gzip
tar -cf test-gz.tar -z test

crontab -l >> work2.log

